package org.tvolkov.mycompany

import grails.converters.JSON

class EmployeeController {
	
	def employeeService
	
	def list = {
		render employeeService.getEmployeeList(params) as JSON;
	}
	
	def add = {
		render employeeService.addNewEmployee(params) as JSON;
	}
	
	def remove = {
		render employeeService.removeEmployee(params) as JSON;
	}
	
	def details = {
		render employeeService.getEmployeeDetails(params) as JSON;
	}
	
	def edit = {
		render employeeService.editEmployee(params) as JSON;
	}
}
